package com.ftg.learn.student.mapper;

import com.ftg.learn.student.dto.StudentSc;
import com.ftg.learn.student.entity.Sc;
import com.sun.jmx.snmp.agent.SnmpMibAgent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ScMapper {

    /**
     * 列出当前的成绩信息以及其参考的学生信息
     */
    @Select("select * from sc a left join student b on a.sno = b.sno")
    List<StudentSc> showScWithStudent();

    /**
     * 要求是查出所有学生信息..和他参加的考试信息
     *
     */
    @Select("select * from sc where sno = #{sno}")
    List<Sc> findOne(@Param("sno") String sno);

}
